<template>
	<el-card class="form-container">
		<el-form :model="editForm" ref="editForm" :rules="dataRule"  @keyup.enter.native="dataFormSubmitHandle()" label-width="90px">
			<el-form-item label="昵称" prop="userNickName">
				<el-input v-model="editForm.userNickName"  placeholder="请输入昵称"></el-input>
			</el-form-item>
			<el-form-item label="邮箱" prop="userEmail">
				<el-input v-model="editForm.userEmail"  placeholder="请输入电子邮件"></el-input>
			</el-form-item>
			<el-form-item label="手机号" prop="userPhone">
				<el-input v-model="editForm.userPhone"  placeholder="请输入手机号" ></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="cancel">取消</el-button>
				<el-button type="primary"  @click="submit('dataForm')">确定</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
import { findSystemUserDetail } from '@/api/admin/systemUser'
export default{
	name: 'user-edit',
	data(){
		return {
			editForm:{
				id: '',
				userCode: '',
				userNickName: '',
				userEmail: '',
				userPhone: '',
				userSex: '',
			}
		}
	},
	created(){
		this.editForm.id = this.$route.query.id
		this.view(this.$route.query.id)
	},
	methods:{
		view(val){
			findSystemUserDetail(val).then(res => {
				this.editForm = res.data.responseData
			})
		},
		cancel(){
			this.$router.go(-1)
		},
		update(){
			
		}
	}
}
</script>

<style>
</style>
